home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’96 / PredatorPrey / CWProj.sit / C14 Calculator.µ.Rsrc.rsrc / TEXT_1029_Automatic Memory Stack.txt < prev    next >
Encoding:
Text File  |  1994-12-07  |  1.7 KB  |  47 lines

  1. - AUTOMATIC MEMORY STACK       
  2. AUTOMATIC MEMORY STACK
  3.  
  4. The Automatic Memory Stack and Stack Manipulation. This calculator uses "Reverse Polish Notation"(RPN), whereby algebraic operators are specified(entered) **after** specifying(entering) the variable(s). This allows for the solution of complicated calculations in a straightforward manner without parentheses or punctuation. It does so by automatically retaining and returning intermediate results. This system is implemented through the automatic memory stack and the ENTER key, minimizing total keystrokes.
  5.  
  6. The Automatic Memory Stack
  7.  
  8.     T    0.000
  9.     Z    0.000
  10.     Y    0.000
  11.     X    0.000    Always displayed.
  12.  
  13. Any number that is keyed in or results from the execution of a numeric function is placed in the display(X-register). This action will cause numbers already in the stack to lift, remain in the same register or drop, depending upon both the immediately preceding and the current operation. Numbers in the stack are stored on a last-in, first-out basis. The three dstacks drawn below illustrate the three types of stack movement. Assume x, y, z, and t represent any numbers which may be in the stack.
  14.  
  15. Stack Lift
  16.  
  17.                   |---------->        lost
  18.     T    t--| |-------->        z
  19.     Z    z----| |------>        y
  20.     Y    y------| |---->        x
  21.     X    x--------|    |-->        œÄ
  22.                                                |
  23. Keys:                          g œÄ
  24.  
  25. No Stack Lift or Drop
  26.  
  27.     T    t------------->        t
  28.     Z    z------------->        z
  29.     Y    y------------->        y
  30.     X    x------------->        ‚àöx
  31.  
  32. Keys:            ‚àöx
  33.  
  34. Stack Drop
  35.  
  36.     T    t-------|----->        t
  37.     Z    z-----| |----->        t
  38.     Y    y---| |------->        z
  39.     X    x---|--------->        x + y
  40.  
  41. Keys:            +
  42.  
  43. Notice that the number in the T-register remains there when the stack drops, allowing this number to be used repetitively as an arithmetic constant.
  44.  
  45.  
  46.  
  47.